package cn.ry.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DataUtil {
    public static String dateToString(Date date, String formatter){
        if(formatter==null || "".equals(formatter)){
            formatter="yyyy-MM-dd";
        }
        SimpleDateFormat sdf = new SimpleDateFormat(formatter);
        return sdf.format(date);
    }
}
